# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-requests-mock
pkgver=1.11.0
_commit=15df8e2b85ae71afea1013b5bf9fd010623acd39
pkgrel=1
pkgdesc="A mock of useful classes and functions to be used with python-requests."
arch=('any')
url="https://github.com/jamielennox/requests-mock"
license=('Apache')
depends=('python-requests' 'python-six')
makedepends=('git' 'python-pbr')
checkdepends=('python-purl' 'python-pytest' 'python-requests-futures' 'python-testtools')
source=("git+https://github.com/jamielennox/requests-mock.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd requests-mock
  python setup.py build
}

check() {
  cd requests-mock
  python -m pytest tests/pytest
  python -m testtools.run discover
}

package() {
  cd requests-mock
  python setup.py install --root="$pkgdir" --optimize=1
}
